package cn.yangliu.comm;

import java.time.format.DateTimeFormatter;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 作者 杨柳
 * 创建时间 2017-08-26 07:52
 */
public final class CommConst {

    public static final String DATETIME_PATTERN = "yyyy-MM-dd HH:mm:ss";

    public static final String DATE_PATTERN = "yyyy-MM-dd";

    public static final String TIME_PATTERN = "HH:mm:ss";

    public static final DateTimeFormatter DATETIME_FORMATTER = DateTimeFormatter.ofPattern(DATETIME_PATTERN);

    public static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern(DATE_PATTERN);

    public static final DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ofPattern(TIME_PATTERN);

    public static final Random RANDOM = new Random();

    public static final String SESSION_USER = "session_user";

    public static final ExecutorService THREDPOOL = Executors.newCachedThreadPool();

    public static final String LOGIN_ERROR_CODE = "401";

    public static final int EXECUTOR_CORE_POOL_SIZE = 10;

    public static final int EXECUTOR_MAX_POOL_SIZE = 200;

    public static final int EXECUTOR_QUEUE_CAPACITY = 10;

}
